import {cleanName} from '@/lib/utils';
import {Hono} from 'hono';
import {memorizedIgnoredWords} from "@/backend/services/public";

export const toolsRouter = new Hono()
    .get('/clean-name/:name', async (c) => {
        const {name} = c.req.param();
        const cleanedName = cleanName(name);
        return c.json({cleanedName});
    })
    .get("/ignored-words", async (c) => {
        const words = await memorizedIgnoredWords()
        return c.json({data: words});
    });
